<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		*{
			padding: 0;
			margin: 0;
		}
		html,body,#myChart{
			width: 100%;
			height: 100%;
		}
	</style>
</head>
<body>
	<div id="myChart"></div>
</body>
<script src="../../libs/jquery/jquery-3.1.1.min.js"></script>
<script src="../../js/originTraceability/echarts-all-2.js"></script>
<script type="text/javascript">
    function keyWords(datas){
//	  console.log('我被调用')
        var myChart = echarts.init(document.getElementById(datas.id));
        var option = {
        		title:{
        			text:datas.titleData,
        			textStyle:{
        				color:'#fff',
        				fontSize:14,
        				fontWeight:'normal'
        			},
        			x:25,
        			y:25
        		},
                tooltip: {
                    show: false
                },
                series: [{
                    name: '',
                    type: 'wordCloud',
                    size: ['100%', '100%'],
                    textRotation : [0, 0, 0, 0],
                    textPadding:150,
                    autoSize:{
                        "enable": true,
                        "minSize": 14
                    },
                    data: [
                        {
                            name: datas.seriesData[0][0],
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f0b5'
                                }
                            }
                        },
                        {
                            name: datas.seriesData[1][0],
                            value: 25,
                            itemStyle: {
                               normal: {
                                    color: '#05f940'
                                }
                            }
                        },
                        {
                            name: datas.seriesData[0][1],
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f940'
                                }
                            }
                        },
                        {
                            name: datas.seriesData[1][1],
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f0b5'
                                }
                            }
                        },
                        {
                            name: datas.seriesData[0][2],
                          
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f940'
                                      
                                }
                            }
                        },
                        {
                            name: datas.seriesData[1][2],
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f0b5'
                                }
                            }
                        },
                        {
                            name: datas.seriesData[0][3],
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f940'
                                }
                            }
                        },
                        {
                            name: datas.seriesData[1][3],
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f0b5'
                                }
                            }
                        },
                        {
                            name: datas.seriesData[0][4],
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f940'
                                }
                            }
                        },
                        {
                            name: datas.seriesData[1][4],
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f0b5'
                                }
                            }
                        },
                        {
                            name: datas.seriesData[0][5],
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f940'
                                }
                            }
                        },
                        {
                            name: datas.seriesData[0][5],
                            value: 25,
                            itemStyle: {
                                normal: {
                                    color: '#05f0b5'
                                }
                            }
                        }
                    ]
                }]
            };

        myChart.setOption(option);
    }
</script>
</html>